package com.shuoyue.ycgk.ui.course.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.baseadapter.AppBaseQuickAdapter;
import com.shuoyue.ycgk.entity.course_teacher.Teacher;
import com.shuoyue.ycgk.utils.GlideUtil;

import java.util.List;

public class TeacherAdapterOld extends AppBaseQuickAdapter<Teacher> {

    public TeacherAdapterOld(@Nullable List<Teacher> data) {
        super(R.layout.item_teacher, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Teacher item) {
        helper.setText(R.id.name, item.getTeacher().getUser().getFullName());
        helper.setText(R.id.tag, item.getTeacher().getAcademicTitle());
        helper.setText(R.id.desc, item.getTeacher().getUser().getProfile());
        GlideUtil.loadImageCircular(mContext, item.getTeacher().getUser().getHeadImageUrl(), R.mipmap.img_loading_gray, helper.getView(R.id.head));

    }
}
